﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChongJu.ModelManager.Rating
{
    public class BatchModel
    {
        public string AccountID { get; set; }

        /// <summary>
        /// 农户名称
        /// </summary>
        public string FarmerName { get; set; }

        /// <summary>
        /// 农户编码
        /// </summary>
        public string FarmerCode { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        public string IDCardNo { get; set; }

        /// <summary>
        /// 批次ID
        /// </summary>
        public int BatchNo { get; set; } = 0;

        /// <summary>
        /// 站点代码
        /// </summary>
        public string SiteCode { get; set; }

        /// <summary>
        /// 种类代码
        /// </summary>
        public string VarietyCode { get; set; }

        /// <summary>
        /// 种类名称
        /// </summary>
        public string VarietyName { get; set; }

        /// <summary>
        /// 分拣模式
        /// </summary>
        public RunTypeEnum RunningMode { get; set; } = RunTypeEnum.Init;

        /// <summary>
        /// 农户分拣状态
        /// </summary>
        public BatchEnum Status { get; set; } = BatchEnum.Init;

        /// <summary>
        /// 删除标识
        /// </summary>
        public bool Delmark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime SubmitTime { get; set; } = DateTime.MinValue;
    }

    /// <summary>
    /// 批次状态
    /// </summary>
    public enum BatchEnum
    {
        Init = -1,

        /// <summary>
        /// 创建
        /// </summary>
        Create = 0,

        /// <summary>
        /// 分拣中
        /// </summary>
        Rating = 1,

        /// <summary>
        /// 清仓结束
        /// </summary>
        End = 2,

        /// <summary>
        /// 已确认
        /// </summary>
        Sure = 3,

        /// <summary>
        /// 提交
        /// </summary>
        Submit = 4,
    }
}
